//
//  daibanTableViewCell.m
//  tongxiangOASystem
//
//  Created by michael on 2018/3/29.
//  Copyright © 2018年 czd. All rights reserved.
//

#import "daibanTableViewCell.h"

@implementation daibanTableViewCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {

//        [self createUI];
self.contentView.backgroundColor = [UIColor colorWithHexString:@"efeff4"];
          self.selectionStyle = UITableViewCellSelectionStyleNone;
//    self.contentView.layer.borderWidth = 5;
//      UIColor *myColor = [UIColor colorWithWhite:0.5 alpha:0.2];
//
//self.contentView.layer.borderColor = [myColor CGColor];
self.bgView  = [[UIView alloc]init];
       [self.contentView addSubview:_bgView];

     _label1 = [[UILabel alloc]init];
    _label1.frame = CGRectZero;
    
      [_label1 setFont:[UIFont systemFontOfSize:13]];
       [self.bgView addSubview:_label1];
    
       _label2 = [[UILabel alloc]init];
    _label2.frame = CGRectZero;
    _label2.numberOfLines = 0;
      [_label2 setFont:[UIFont systemFontOfSize:14]];
       [self.bgView addSubview:_label2];
    
       _label3 = [[UILabel alloc]init];
    _label3.frame = CGRectZero;
      [_label3 setFont:[UIFont systemFontOfSize:14]];
       [self.bgView addSubview:_label3];

    
}

return self;

}
- (void)layoutSubviews{
[super layoutSubviews];
     CGFloat  titleFloat  = [OAToolBox sizebyText:_dic[@"subject"] font:14 minsWidth:60];
self.bgView.frame =  CGRectMake(10, 5, KScreenWidth - 20, titleFloat+30);
    self.bgView.backgroundColor = [UIColor whiteColor];
    _label1.frame =CGRectMake(5, 5,20, 20);
_label1.textAlignment = 1;
_label1.backgroundColor = [UIColor colorWithHexString:@"efeff4"];
_label1.layer.cornerRadius = 10;
_label1.clipsToBounds = YES;
_label1.text = _number;
_label1.textColor = [UIColor blueColor];
_label2.frame =CGRectMake(_label1.right+5, 5,kScreenWidth-60, titleFloat);
_label2.text = _dic[@"subject"] ;
_label2.textColor = [UIColor colorWithHexString:@"1870ca"];
_label3.frame =CGRectMake(_label1.right+5, _label2.bottom, kScreenWidth-60, 20);
//_label3.backgroundColor = [UIColor greenColor];
_label3.text = [NSString stringWithFormat:@" %@",_dic[@"file1"]];
_label3.textColor = [UIColor colorWithHexString:@"2c2c2c"];

//2c2c2c
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
